<%@ page language="java" pageEncoding="utf-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<h3>购物车内有：<bean:write name="orderitemsize"></bean:write> 项临时商品</h3>
<table width="100%" class="content_table">
         <tr><th width="20%">商品名称</th><th width="20%">商品编码</th><th width="15%" align="right">价格</th><th width="15%" align="right">数量</th><th width="15%" align="right">小计</th><th width="15%">操作</th></tr>
         <bean:define id="total" value="0"></bean:define>
       <logic:iterate id="item" name="order" property="items">
          <tr><td align="left">${item.pid}|${item.name }</td><td align="center">${item.NO }</td><td align="right">${item.price }</td><td align="right">${item.amount}</td><td align="right">${item.price*item.amount}</td><td align="center"><html:link page="/linkToDeleteItem.do?id=${item.id}">删除</html:link></td></tr>
          
          <bean:define id="total" value="${total+item.amount*item.price}"></bean:define>
       </logic:iterate>
       <tr><td align="right" colspan="5"><br/>总计：<bean:write name="total"/>元,可获积分：${score}.<font color="red"><html:link page="/forwardToIndex.do">继续选购</html:link> </font></td></tr>
       
</table>
<%session.setAttribute("time",new java.util.Date()); %>
<!-- <table width="100%"><tr><td align="center">保存订单|<html:link page="/submitOrder.do">提交订单</html:link></td></tr></table>-->